import { S } from '../../s';
import { IPSEditor } from '../ipseditor';
import { IPSSearchBarFilter } from './ipssearch-bar-filter';
import { PSSysSearchBarItemImplBase } from './pssys-search-bar-item-impl-base';
import { IPSDEFSearchMode } from '../../dataentity/defield/ipsdefsearch-mode';
import { IPSLanguageRes } from '../../res/ipslanguage-res';
import { IPSSysCss } from '../../res/ipssys-css';
import { IPSSysImage } from '../../res/ipssys-image';

export class PSSysSearchBarFilterImpl
  extends PSSysSearchBarItemImplBase
  implements IPSSearchBarFilter
{
  protected cappslanguageres: IPSLanguageRes;
  getCapPSLanguageRes(): IPSLanguageRes | null {
    return (
      this.cappslanguageres ||
      (this.cappslanguageres = this.fillObjectModel(
        S._276,
        this.M.getCapPSLanguageRes,
        S._2a8,
      ) as IPSLanguageRes)
    );
  }

  get caption(): string {
    return this.M.caption;
  }

  get createDV(): string {
    return this.M.createDV;
  }

  get createDVT():
    | 'SESSION'
    | 'APPLICATION'
    | 'UNIQUEID'
    | 'CONTEXT'
    | 'PARAM'
    | 'OPERATOR'
    | 'OPERATORNAME'
    | 'CURTIME'
    | 'APPDATA' {
    return this.M.createDVT;
  }

  get dataType():
    | 0
    | 1
    | 2
    | 3
    | 4
    | 5
    | 6
    | 7
    | 8
    | 9
    | 10
    | 11
    | 12
    | 13
    | 14
    | 15
    | 16
    | 17
    | 18
    | 19
    | 20
    | 21
    | 22
    | 23
    | 24
    | 25
    | 26
    | 27
    | 28
    | 29 {
    return this.M.dataType;
  }

  get itemHeight(): number {
    return this.M.itemHeight != null ? this.M.itemHeight : 0.0;
  }

  get itemWidth(): number {
    return this.M.itemWidth != null ? this.M.itemWidth : 0.0;
  }

  get labelCssStyle(): string {
    return this.M.labelCssStyle;
  }

  get labelPos(): 'LEFT' | 'TOP' | 'RIGHT' | 'BOTTOM' | 'NONE' {
    return this.M.labelPos;
  }

  get labelWidth(): number {
    return this.M.labelWidth;
  }

  get outputCodeListConfigMode(): 0 | 1 | 2 {
    return this.M.outputCodeListConfigMode != null
      ? this.M.outputCodeListConfigMode
      : 0;
  }

  protected phpslanguageres: IPSLanguageRes;
  getPHPSLanguageRes(): IPSLanguageRes | null {
    return (
      this.phpslanguageres ||
      (this.phpslanguageres = this.fillObjectModel(
        S._276,
        this.M.getPHPSLanguageRes,
        S._2ef,
      ) as IPSLanguageRes)
    );
  }

  protected psdefsearchmode: IPSDEFSearchMode;
  getPSDEFSearchMode(): IPSDEFSearchMode | null {
    return (
      this.psdefsearchmode ||
      (this.psdefsearchmode = this.fillObjectModel(
        S._1c4,
        this.M.getPSDEFSearchMode,
        S._318,
      ) as IPSDEFSearchMode)
    );
  }

  protected pseditor: IPSEditor;
  getPSEditor(): IPSEditor | null {
    return (
      this.pseditor ||
      (this.pseditor = this.fillObjectModel(
        S._12e,
        this.M.getPSEditor,
        S._2f0,
      ) as IPSEditor)
    );
  }

  protected pssyscss: IPSSysCss;
  getPSSysCss(): IPSSysCss | null {
    return (
      this.pssyscss ||
      (this.pssyscss = this.fillObjectModel(
        S._278,
        this.M.getPSSysCss,
        S._2ac,
      ) as IPSSysCss)
    );
  }

  protected pssysimage: IPSSysImage;
  getPSSysImage(): IPSSysImage | null {
    return (
      this.pssysimage ||
      (this.pssysimage = this.fillObjectModel(
        S._27b,
        this.M.getPSSysImage,
        S._2ad,
      ) as IPSSysImage)
    );
  }

  get resetItemName(): string {
    return this.M.resetItemName;
  }

  get unitName(): string {
    return this.M.unitName;
  }

  get unitNameWidth(): number {
    return this.M.unitNameWidth != null ? this.M.unitNameWidth : 0;
  }

  get valueItemName(): string {
    return this.M.valueItemName;
  }

  get width(): number {
    return this.M.width != null ? this.M.width : 0.0;
  }

  get addSeparator(): boolean {
    return this.M.addSeparator != null ? this.M.addSeparator : false;
  }

  get allowEmpty(): boolean {
    return this.M.allowEmpty;
  }

  get convertToCodeItemText(): boolean {
    return this.M.convertToCodeItemText != null
      ? this.M.convertToCodeItemText
      : false;
  }

  get emptyCaption(): boolean {
    return this.M.emptyCaption;
  }

  get enableItemPriv(): boolean {
    return this.M.enableItemPriv != null ? this.M.enableItemPriv : false;
  }

  get enableUnitName(): boolean {
    return this.M.enableUnitName != null ? this.M.enableUnitName : false;
  }

  get hidden(): boolean {
    return this.M.hidden;
  }

  get needCodeListConfig(): boolean {
    return this.M.needCodeListConfig != null
      ? this.M.needCodeListConfig
      : false;
  }

  get showCaption(): boolean {
    return this.M.showCaption;
  }
  get cls(): string {
    return 'PSSysSearchBarFilterImpl';
  }
  instanceof(cls: string): boolean {
    if (cls == S._19a) return true;
    return super.instanceof(cls);
  }
}
